<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="__ROOT__/Public/Admin/css/shortcut icon" href="favicon.ico"> 
    <link href="__ROOT__/Public/Admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__ROOT__/Public/Admin/css/animate.css" rel="stylesheet">
    <link href="__ROOT__/Public/Admin/css/style.css?v=4.1.0" rel="stylesheet">
	<link href="__ROOT__/Public/Admin/css/jquery.treetable.css" rel="stylesheet"/>
	<link href="__ROOT__/Public/Admin/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
	<link href="__ROOT__/Public/Admin/css/official.css" rel="stylesheet">
    <style>
		.nav-tabs{
			margin-bottom: 20px;
		}
		.err-tip-color{
			color:#ed2a2a;
		}
		#content-main{height: calc(100%) !important;}
		<if condition="APP_DEBUG">
				#think_page_trace_open{
					z-index:9999;
				}
		</if>
		.loading{
			 width: 35px;
			 height: 35px;
			 margin: 0 auto;
			 margin-top:100px;
			 position: fixed;
			 top: 0px;
			 left: 0px;
			 right: 0px;
			 bottom: 0px;
			 margin: auto;
		}
    </style>
</head>
<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="ibox float-e-margins">
            <div class="ibox-content">
				<ul class="nav nav-tabs">
                    <li class="active"><a href="#"><i class="fa fa-user"></i> 列表</a>
                    </li>
                    <li class=""><a href="{:U('Customer/save')}"><i class="fa fa-plus"></i> 添加</a></li>
                </ul>
                <form class="well form-search form-inline" method="post" action="">
                    <div class="form-group">
                        <input type="text" class="form-control" name="keyword"  value="{:I('request.keyword/s','')}" placeholder="请输入标识名称">
                    </div>
                    <input type="submit" class="btn btn-primary" value="搜索" /> 
                </form>
				<table class="table table-hover table-bordered table-list" id="cates-table">
					<thead id="thead">
						<tr>
							<th width="5%">序号</th>
							<th>客户名称</th>
							<th>联系人姓名</th>
							<th>地址</th>
							<th>联系电话</th>
							<th width="10%">操作</th>
						</tr>
					</thead>
					<tbody>
						<volist name="list" id="vo">
							<tr> 
								<td>{$vo.ID}</td>
								<td>{$vo.Name}</td>
								<td>{$vo.Contact}</td>
								<td>{$vo.Address}</td>
								<td>{$vo.Phone}</td>
								<td>
								<a class="js-ajax-delete" href="javascript:select({$vo.ID},'{$vo.Name}');">选择</a></td>
								
							</tr>  
						</volist>
						<if condition="count($list) lt 1">
	                        <tr>
	                            <td colspan="6" class="text-center">查无数据</td>
	                        </tr>
                        </if>
					</tbody>
				</table>
			</div>
        </div>
    </div>
	<script src="__ROOT__/Public/Admin/js/jquery.js"></script>  
    <script src="__ROOT__/Public/Admin/js/treetable/jquery.treetable.js"></script>
	<script src="__ROOT__/Public/Admin/js/plugins/sweetalert/sweetalert.min.js"></script>
	<script>
	var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
			//选择客户
			function select(id,name){
			//alert(id+name);
			var IDD="#{:I('type')}";
			var IDDNAME="#{:I('type')}Name";
			parent.$(IDD).val(id);
            parent.$(IDDNAME).val(name);
            parent.layer.close(index);
            return false;
		}
    </script>

</body>
</html>